/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __PHI_H
#define __PHI_H


#ifdef __cplusplus
 extern "C" {
#endif
	 
	 /* Includes ------------------------------------------------------------------*/
#include "stm32f0xx.h"
	 
typedef enum 
{
  PHI1 = 0,
  PHI2 = 1,
	PHI3 = 2,
  PHI4 = 3,
  PHI5 = 4,
	PHI6 = 5
} PHI_TypeDef;


#define PHIn                             6
  
#define PHI1_PIN                         GPIO_Pin_4
#define PHI1_GPIO_PORT                   GPIOB
#define PHI1_GPIO_CLK                    RCC_AHBPeriph_GPIOB
  
#define PHI2_PIN                         GPIO_Pin_5
#define PHI2_GPIO_PORT                   GPIOB
#define PHI2_GPIO_CLK                    RCC_AHBPeriph_GPIOB

#define PHI3_PIN                         GPIO_Pin_0
#define PHI3_GPIO_PORT                   GPIOB
#define PHI3_GPIO_CLK                    RCC_AHBPeriph_GPIOB

#define PHI4_PIN                         GPIO_Pin_1
#define PHI4_GPIO_PORT                   GPIOB
#define PHI4_GPIO_CLK                    RCC_AHBPeriph_GPIOB
  
#define PHI5_PIN                         GPIO_Pin_2
#define PHI5_GPIO_PORT                   GPIOB
#define PHI5_GPIO_CLK                    RCC_AHBPeriph_GPIOB

#define PHI6_PIN                         GPIO_Pin_3
#define PHI6_GPIO_PORT                   GPIOB
#define PHI6_GPIO_CLK                    RCC_AHBPeriph_GPIOB

	
void PHI_high(PHI_TypeDef Phi);
void PHI_init(PHI_TypeDef Phi);
void PHI_low(PHI_TypeDef Phi);
void PHI_toggle(PHI_TypeDef Phi);
void Phase_init(void);
void Phase1(void);
void Phase2(void);
void Phase1_set(void);
void Phase2_set(void);
void Phase_toggle(void);
void Phase_toggle_set(void);

#ifdef __cplusplus
}
#endif
#endif
